# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Jordi De Groof <jordi.degroof@gmail.com>
# Contributor: Andre Klitzing <aklitzing@gmail.com>

pkgname=lcov
pkgver=2.0
pkgrel=2
pkgdesc='front-end for GCC’s coverage testing tool gcov'
arch=(any)
url="https://github.com/linux-test-project/$pkgname"
license=(GPL)
depends=(perl
         perl-capture-tiny
         perl-datetime
         perl-devel-cover
         perl-memory-process)
optdepends=('perl-json-xs: faster JSON parsing than built in JSON:PP'
            'python: enable extra support scripts'
            'python-coverage: enable python coverage reporting'
            'python-xlsxwriter: generate shpreadsheet reports')
backup=(etc/lcovrc)
_archive="$pkgname-$pkgver"
source=("$url/releases/download/v$pkgver/$_archive.tar.gz")
sha256sums=('1857bb18e27abe8bcec701a907d5c47e01db4d4c512fc098d1a6acd29267bf46')

package () {
    cd "$_archive"
    make PREFIX="/usr" CFG_DIR=/etc DESTDIR="$pkgdir" install
}

